unit SettingsFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons;

type
  TSettingsForm = class(TForm)
    GroupBox1: TGroupBox;
    GroupBox2: TGroupBox;
    Label1: TLabel;
    cbBackgroundColor: TColorBox;
    rbEasy: TRadioButton;
    rbHard: TRadioButton;
    OK: TBitBtn;
    bCancel: TBitBtn;
    cbExtendedGraphics: TCheckBox;
    Label2: TLabel;
    procedure FormKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

const
 ESC_KEYCODE = #27;

var
  SettingsForm: TSettingsForm;

implementation

{$R *.dfm}

procedure TSettingsForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
 if Key = ESC_KEYCODE then ModalResult := mrCancel;
end;

end.
